package com.push.graph.controller;

import com.push.graph.pojo.CourseSchedule;
import com.push.graph.service.impl.CourseScheduleServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/tool/graph")
public class FindByClassGrade {
    @Autowired
    private CourseScheduleServiceImpl courseScheduleService;


//    @PreAuthorize("@ss.hasPermi('tool:gen:list')")
    @GetMapping("/findByClassGrade")
    public List<CourseSchedule> findByClassGrade(@RequestParam("classGrade") String classGrade) {
        return courseScheduleService.findByClassGrade(classGrade);
    }

}

